import request from '@/utils/request'

// 查询利息分摊列表
export function listInterestShare(query) {
  return request({
    url: '/ibatis/interestShare/list',
    method: 'get',
    params: query
  })
}

export function listRateDetail(query) {
  return request({
    url: '/ibatis/interestShare/listRateDetail',
    method: 'get',
    params: query
  })
}

// 查询利息分摊详细
export function getInterestShare(rateId) {
  return request({
    url: '/ibatis/interestShare/' + rateId,
    method: 'get'
  })
}
export function getRateDetail(rateDetailId) {
  return request({
    url: '/ibatis/interestShare/getRateDetail/' + rateDetailId,
    method: 'get'
  })
}

// 新增利息分摊
export function addInterestShare(data) {
  return request({
    url: '/ibatis/interestShare',
    method: 'post',
    data: data
  })
}

// 修改利息分摊
export function updateInterestShare(data) {
  return request({
    url: '/ibatis/interestShare',
    method: 'put',
    data: data
  })
}

// 修改备注
export function updateRemarkT(data) {
  return request({
    url: '/ibatis/interestShare/updateRemarkT',
    method: 'put',
    data: data
  })
}
// 修改利息
export function updateRateDetailT(data) {
  return request({
    url: '/ibatis/interestShare/updateRateDetailT',
    method: 'put',
    data: data
  })
}

// 删除利息分摊
export function delInterestShare(rateId) {
  return request({
    url: '/ibatis/interestShare/' + rateId,
    method: 'delete'
  })
}
